import request from '@/utils/request';

import type {loginData, loginResponseData, userInfoResponseData} from './model/login';

//枚举接口地址
enum API{
    LOGOURL = '/admin/acl/index/login',
    INFO = '/admin/acl/index/info',
    LOGOUT='/admin/acl/index/logout',
}

//登录接口
export const reqLogin = (data:loginData) =>request.post<any,loginResponseData>(API.LOGOURL,data);

//获取用户信息携带token
export const reqUserInfo = ()=>request.get<any,userInfoResponseData>(API.INFO);

//退出登录
export const reqLogOut = ()=>request.post<any,any>(API.LOGOUT);